package com.scalar.forecast.projectSetup;

import org.apache.struts.util.LabelValueBean;

import java.io.Serializable;
import java.util.Random;
import java.util.ArrayList;

/**
 * Value Object Which Contains Project Setup details
 *
 * Created by Veeru. 
 * Date: Feb 19, 2005
 * Time: 11:43:03 AM 
 */

public class ProjectSetup implements Serializable {

    Random r = new Random();
    private int projectID      = r.nextInt(1000) * -1;
    private int customerID     = 0;
    private int odmID          = 0;
    private int endUserId      = 0;
    private int salesPersonID  = 0;
    private int availableChip  = 0;
    private int availableBoard = 0;
    private int availableKit   = 0;

    private String[] availableChips;
    private String[] availableBoards;
    private String[] availableKits;
    private String[] selectedChips;
    private String[] selectedBoards;
    private String[] selectedKits;

    private String projectName   = null;
    private String projectStatus = null;
    private String customerName  = null;
    private String odmName       = null;
    private String endUserName   = null;
    private String salesPerson   = null;

    private ArrayList availableChipsList = new ArrayList();
    private ArrayList availableBoardsList = new ArrayList();
    private ArrayList availableKitsList = new ArrayList();

    private ArrayList selectedChipsList = new ArrayList();
    private ArrayList selectedBoardsList = new ArrayList();
    private ArrayList selectedKitsList = new ArrayList();

    private ArrayList userDefinedFeilds = new ArrayList();

    public ProjectSetup() {

    }

    public int getProjectID() {
        return projectID;
    }

    public void setProjectID(int projectID) {
        this.projectID = projectID;
    }

    public int getCustomerID() {
        return customerID;
    }

    public void setCustomerID(int customerID) {
        this.customerID = customerID;
    }

    public int getOdmID() {
        return odmID;
    }

    public void setOdmID(int odmID) {
        this.odmID = odmID;
    }

    public int getSalesPersonID() {
        return salesPersonID;
    }

    public void setSalesPersonID(int salesPersonID) {
        this.salesPersonID = salesPersonID;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectStatus() {
        return projectStatus;
    }

    public void setProjectStatus(String projectStatus) {
        this.projectStatus = projectStatus;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getOdmName() {
        return odmName;
    }

    public void setOdmName(String odmName) {
        this.odmName = odmName;
    }

    public String getSalesPerson() {
        return salesPerson;
    }

    public void setSalesPerson(String salesPerson) {
        this.salesPerson = salesPerson;
    }

    public ArrayList getAvailableChipsList() {
        return availableChipsList;
    }

    public void setAvailableChipsList(ArrayList availableChipsList) {
        this.availableChipsList = availableChipsList;
    }

    public ArrayList getAvailableBoardsList() {
        return availableBoardsList;
    }

    public void setAvailableBoardsList(ArrayList availableBoardsList) {
        this.availableBoardsList = availableBoardsList;
    }

    public ArrayList getAvailableKitsList() {
        return availableKitsList;
    }

    public void setAvailableKitsList(ArrayList availableKitsList) {
        this.availableKitsList = availableKitsList;
    }

    public ArrayList getSelectedChipsList() {
        return selectedChipsList;
    }

    public void setSelectedChipsList(ArrayList selectedChipsList) {
        this.selectedChipsList = selectedChipsList;
    }

    public ArrayList getSelectedBoardsList() {
        return selectedBoardsList;
    }

    public void setSelectedBoardsList(ArrayList selectedBoardsList) {
        this.selectedBoardsList = selectedBoardsList;
    }

    public ArrayList getSelectedKitsList() {
        return selectedKitsList;
    }

    public void setSelectedKitsList(ArrayList selectedKitsList) {
        this.selectedKitsList = selectedKitsList;
    }


    public ArrayList getUserDefinedFeilds() {
        return userDefinedFeilds;
    }

    public void setUserDefinedFeilds(ArrayList userDefinedFeilds) {
        this.userDefinedFeilds = userDefinedFeilds;
    }

    public int getAvailableChip() {
        return availableChip;
    }

    public void setAvailableChip(int availableChip) {
        this.availableChip = availableChip;
    }


    public int getAvailableBoard() {
        return availableBoard;
    }

    public void setAvailableBoard(int availableBoard) {
        this.availableBoard = availableBoard;
    }


    public int getAvailableKit() {
        return availableKit;
    }

    public void setAvailableKit(int availableKit) {
        this.availableKit = availableKit;
    }

    public String[] getAvailableChips() {
        return availableChips;
    }

    public void setAvailableChips(String[] availableChips) {
        this.availableChips = availableChips;
    }

    public String[] getAvailableBoards() {
        return availableBoards;
    }

    public void setAvailableBoards(String[] availableBoards) {
        this.availableBoards = availableBoards;
    }

    public String[] getAvailableKits() {
        return availableKits;
    }

    public void setAvailableKits(String[] availableKits) {
        this.availableKits = availableKits;
    }

    public String[] getSelectedChips() {
        return selectedChips;
    }

    public void setSelectedChips(String[] selectedChips) {
        this.selectedChips = selectedChips;
    }

    public String[] getSelectedBoards() {
        return selectedBoards;
    }

    public void setSelectedBoards(String[] selectedBoards) {
        this.selectedBoards = selectedBoards;
    }

    public String[] getSelectedKits() {
        return selectedKits;
    }

    public void setSelectedKits(String[] selectedKits) {
        this.selectedKits = selectedKits;
    }

    public ArrayList getSelectedParts() {
        ArrayList selectedChipsList  = getSelectedChipsList();
        ArrayList selectedBoardsList = getSelectedBoardsList();
        ArrayList selectedKitsList   = getSelectedKitsList();

        ArrayList selectedParts = new ArrayList();
        String selectedPart = null;

        for ( int i = 0; i < selectedChipsList.size(); i++ ) {
            selectedPart = ( (LabelValueBean)selectedChipsList.get(i)).getValue();
            selectedParts.add( selectedPart );
        }
        for ( int i = 0; i < selectedBoardsList.size(); i++ ) {
            selectedPart = ( (LabelValueBean)selectedBoardsList.get(i)).getValue();
            selectedParts.add( selectedPart );
        }
        for ( int i = 0; i < selectedKitsList.size(); i++ ) {
            selectedPart = ( (LabelValueBean)selectedKitsList.get(i)).getValue();
            selectedParts.add( selectedPart );
        }
        return selectedParts;
    }

    public int getEndUserId() {
        return endUserId;
    }

    public void setEndUserId(int endUserId) {
        this.endUserId = endUserId;
    }

    public String getEndUserName() {
        return endUserName;
    }

    public void setEndUserName(String endUserName) {
        this.endUserName = endUserName;
    }
}
